package com.sailfish.template.service.pm.impl;

import com.sailfish.template.api.dto.pm.ProjectDTO;
import com.sailfish.template.infra.common.utils.CopyUtils;
import com.sailfish.template.infra.repository.pm.ProjectRepository;
import com.sailfish.template.service.pm.ProjectQueryService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author XIAXINYU3
 * @date 2021/11/2
 */
@Slf4j
@Service
public class ProjectQueryServiceImpl implements ProjectQueryService {

    @Autowired
    ProjectRepository projectRepository;

    @Override
    public ProjectDTO findOne(Long id) {
        return CopyUtils.copy(projectRepository.findOne(id), ProjectDTO.class);
    }
}
